package com.apchernykh.rozhlasapp.ui.podcasts;

import com.apchernykh.rozhlasapp.ui.BaseDetailsFragment;
import com.apchernykh.rozhlasapp.ui.RozhlasAppBaseFragmentActivity;
import android.content.res.Configuration;
import android.os.Bundle;

public class FeedDetailsActivity extends RozhlasAppBaseFragmentActivity {
    @Override
    protected void onCreate(Bundle iSavedInstanceState) {
        super.onCreate(iSavedInstanceState);

        if (getResources().getConfiguration().orientation
                == Configuration.ORIENTATION_LANDSCAPE) {
            // If the screen is now in landscape mode, we can show the
            // dialog in-line with the list so we don't need this activity.
            finish();
            return;
        }

        if (iSavedInstanceState == null) {
            // During initial setup, plug in the details fragment.
        	BaseDetailsFragment aDetails = new FeedDetailsFragment();
            aDetails.setArguments(getIntent().getExtras());
            getSupportFragmentManager().beginTransaction().add(
            		android.R.id.content, aDetails).commit();
        }
    }
    
}